package com.example.demo.listen;


import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.GenericApplicationListenerAdapter;
import org.springframework.stereotype.Component;
import org.springframework.util.StopWatch;

/**
 * @author yujie
 * @create 2018-04-26 上午10:58
 **/
public class TestListener implements ApplicationListener {
    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        /**
         *
         * ApplicationStartingEvent
         *
         * ApplicationEnvironmentPreparedEvent
         *
         * ApplicationPreparedEvent
         *
         * ContextRefreshedEvent
         *
         * ServletWebServerInitializedEvent
         *
         * ApplicationStartedEvent
         *
         * ApplicationReadyEvent
         */
        System.out.println(event.toString());
    }

}
